package com.joysuch.wwyt.core.enums;

/**
 * 学历
 * @Author ZhangDong
 * @Date 2020/12/22 13:32
 */
public enum EducationTypes {

    XL_XX(1429, "小学"),
    XL_CZ(1430, "初中"),
    XL_GZ(1431, "高中"),
    XL_ZZ(1432, "中专"),
    XL_DZ(1433, "大专"),
    XL_BK(1434, "本科"),
    XL_SS(1435, "硕士"),
    XL_BS(1436, "博士");

    private Integer id;
    private String education;

    EducationTypes(Integer id, String education) {
        this.id = id;
        this.education = education;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getEducation() {
        return education;
    }

    public void setEducation(String education) {
        this.education = education;
    }

    public static Integer getId(String education) {
        EducationTypes[] values = EducationTypes.values();
        for (EducationTypes value : values) {
            if (value.education.equals(education)) {
                return value.id;
            }
        }
        return null;
    }

}
